﻿@model CustomerAddressEditModel
@using Nop.Web.Models.Customer;
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Account").Text);
}
@section left
{
    @Html.Action("CustomerNavigation", "Customer", new { selectedTabId = CustomerNavigationEnum.Addresses })
}
@using (Html.BeginForm())
{
    <div class="panel panel-default form-panel">
        <div class="panel-heading">
            <h3>@T("Account.MyAccount") - @T("Account.CustomerAddresses.Edit")</h3>
        </div>
        <div class="panel-body">
            <div class="message-error">
                @Html.ValidationSummary(true)
            </div>
            @{
    var dataDictAddress = new ViewDataDictionary();
    //Merge ModelState (required for validation)
    dataDictAddress.ModelState.Merge(ViewData.ModelState);
    dataDictAddress.TemplateInfo.HtmlFieldPrefix = "Address";
    @Html.Partial("_CreateOrUpdateAddress", Model.Address, dataDictAddress)
            }
            <div class="buttons">
                <input type="submit" class="btn btn-default" value="@T("Common.Save")" />
            </div>
        </div>
    </div>
}